home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_09_11 / 9n11098a < prev    next >
Text File  |  1991-04-11  |  2KB  |  47 lines

  1. Listing 4 - Additions to the Main CIPS Program
  2.  
  3. (from file cips.c)
  4.  
  5.  
  6.  
  7.         case 8:  /* perform edge detection */
  8.            printf("\nCIPS> Enter input image name\n");
  9.            get_image_name(name);
  10.            printf("\nCIPS> Enter output image name\n");
  11.            get_image_name(name2);
  12.            get_parameters(&il, &ie, &ll, &le);
  13.            get_edge_options(&detect_type, &detect_threshold,
  14.                             &high);
  15.            if(detect_type == 4)
  16.               quick_edge(name, name2, the_image, out_image,
  17.                          il, ie, ll, le, detect_threshold,
  18.                          high);
  19.            else
  20.               detect_edges(name, name2, the_image, out_image,
  21.                            il, ie, ll, le, detect_type,
  22.                            detect_threshold, high);
  23.          break;
  24.  
  25.  
  26.  
  27.  
  28.  
  29. show_menu()
  30. {
  31.  
  32.         printf("\n\n\nWelcome to CIPS");
  33.         printf("\nThe C Image Processing System");
  34.         printf("\nThese are you choices:\n");
  35.         printf("\n\t1.  Display image header");
  36.         printf("\n\t2.  Show image numbers");
  37.         printf("\n\t3.  Print image numbers");
  38.         printf("\n\t4.  Display image (VGA & EGA only)");
  39.         printf("\n\t5.  Display or print image using halftoning");
  40.         printf("\n\t6.  Print graphics image using dithering");
  41.         printf("\n\t7.  Print or display histogram numbers");
  42.         printf("\n\t8.  Perform edge detection");
  43.         printf("\n\t20. Exit system");
  44.         printf("\n\nEnter choice _\b");
  45.  
  46. }    /* ends show_menu */
  47.